From: John Marshall Date: Mon, 11 Jun 2018 08:40:45 +0000 (+0100) Subject: meson build: improve function checking X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2~11^2~126 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c9b04dc42a0279f0279af8de60a39b4df521bf19;p=babl.git meson build: improve function checking --- diff --git a/meson.build b/meson.build index fbca825..ab1d042 100644 --- a/meson.build +++ b/meson.build @@ -245,11 +245,12 @@ endforeach # Check functions # general check_functions = [ - ['HAVE_GETTIMEOFDAY', 'gettimeofday'], - ['HAVE_SRANDOM', 'srandom' ], + ['HAVE_GETTIMEOFDAY', 'gettimeofday', ''], + ['HAVE_RINT', 'rint' , ''], + ['HAVE_SRANDOM', 'srandom' , ''], ] foreach func: check_functions - if cc.has_function(func[1]) + if cc.has_function(func[1], prefix: '#include ' + func[2]) conf.set(func[0], 1, description: 'Define to 1 if the @0@() function is available'.format(func[1])) endif